package com.ln.property_control.controller;

import com.ln.property_control.pojo.ResultVo;
import com.ln.property_control.pojo.User;
import com.ln.property_control.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

@Controller
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping("/codeLogin")
    @ResponseBody
    public ResultVo codeLogin(User user, HttpSession session){
        ResultVo resultVo = userService.queryUser(user,session);
        return resultVo;
    }
}
